{literal}<?php{/literal}

// ---------------------------------------------------------------------------
// Please, don't touch this file.
// If you need to custom this Class, you can edit {$entity->singular}.php
// file overwrite and define new methods
// ---------------------------------------------------------------------------

/**
 * {$entity->description}
 *
 * @Authors {foreach from=$entity->project->user item="usr" name=authors}{if $smarty.foreach.authors.first}{$usr->fullname()}{else}, {$usr->fullname()}{/if}{/foreach} 
 * @package {$entity->project->slug}
 * @subpackage model
 */
class {$entity->singular|capitalize:true}_protoweb extends {$entity->project->slug|capitalize:true}_model
{
	public $table      = "{$entity->plural}";
	public $model      = "{$entity->singular}";
	public $has_many   = array({foreach from=$entity->getHasMany() item="ent_hasmany" name=many}{if $smarty.foreach.many.first}'{$ent_hasmany->singular}'{else}, '{$ent_hasmany->singular}'{/if}{/foreach});
	public $has_one    = array({foreach from=$entity->getHasOne() item="ent_hasone"  name=one}{if $smarty.foreach.one.first}'{$ent_hasone->singular}'{else}, '{$ent_hasone->singular}'{/if}{/foreach});
	{if ! $has_validations}
	public $validation = array();
	{else}
	public $validation = array({foreach from=$entity->attribute item="attribute" name=validation}{if $smarty.foreach.validation.first}

		'{$attribute->name}' => array(
			'label' => '{$attribute->label}',
			'rules' => array({$attribute->rules}){else}
			
		),
		'{$attribute->name}' => array(
			'label' => '{$attribute->label}',
			'rules' => array({$attribute->rules})
		{/if}{/foreach})
	); // $validation
	{/if}


	public function __construct($id = NULL)
	{
		parent::__construct($id);
	}

} // Class {$entity->singular|capitalize:true}_protoweb

/* End of file {$entity->singular}_protoweb.php */
/* Location: ./application/models/protoweb/{$entity->singular}_protoweb.php */